import request from '../util/axios'
import { serialize } from '../util/util'
import qs from 'qs'

// 获取实体分类号树
export const getClassificationTree = (query, data = {}) => {
  return request({
    url: '/yuyi-config-boot/fldg/paging' + serialize(query),
    method: 'post',
    data: data
  })
}

// 实体分类号树 - 新增数据
export const addClassificationTree = (data) => {
  return request({
    url: '/yuyi-config-boot/fldg/add',
    method: 'post',
    data: data
  })
}
// 实体分类号树 - 编辑修改数据
export const editClassificationTree = (data) => {
  return request({
    url: '/yuyi-config-boot/fldg/edit',
    method: 'put',
    data: data
  })
}

// 实体分类号树 - 删除数据
export const delClassificationTree = (id) => {
  return request({
    url: `/yuyi-config-boot/fldg/delete?id=${id}`,
    method: 'delete',
    data: {}
  })
}

// 卡片表单   ----   获取实体分类号树
export const getClassificationTreeForm = (data = {}) => {
  return request({
    url: '/yuyi-config-boot/fldg/pagings',
    method: 'post',
    data: qs.stringify(data)
  })
}
